3.49 \(\int (c+d x) \cot (a+b x) \csc ^2(a+b x) \, dx\)

Optimal. Leaf size=35 \[ -\frac{d \cot (a+b x)}{2 b^2}-\frac{(c+d x) \csc ^2(a+b x)}{2 b} \]

[Out]

-(d*Cot[a + b*x])/(2*b^2) - ((c + d*x)*Csc[a + b*x]^2)/(2*b)

________________________________________________________________________________________

Rubi [A]  time = 0.0314137, antiderivative size = 35, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.15, Rules used = {4410, 3767, 8} \[ -\frac{d \cot (a+b x)}{2 b^2}-\frac{(c+d x) \csc ^2(a+b x)}{2 b} \]

Antiderivative was successfully verified.

[In]

Int[(c + d*x)*Cot[a + b*x]*Csc[a + b*x]^2,x]

[Out]

-(d*Cot[a + b*x])/(2*b^2) - ((c + d*x)*Csc[a + b*x]^2)/(2*b)

Rule 4410

Int[Cot[(a_.) + (b_.)*(x_)]^(p_.)*Csc[(a_.) + (b_.)*(x_)]^(n_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> -Simp
[((c + d*x)^m*Csc[a + b*x]^n)/(b*n), x] + Dist[(d*m)/(b*n), Int[(c + d*x)^(m - 1)*Csc[a + b*x]^n, x], x] /; Fr
eeQ[{a, b, c, d, n}, x] && EqQ[p, 1] && GtQ[m, 0]

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int (c+d x) \cot (a+b x) \csc ^2(a+b x) \, dx &=-\frac{(c+d x) \csc ^2(a+b x)}{2 b}+\frac{d \int \csc ^2(a+b x) \, dx}{2 b}\\ &=-\frac{(c+d x) \csc ^2(a+b x)}{2 b}-\frac{d \operatorname{Subst}(\int 1 \, dx,x,\cot (a+b x))}{2 b^2}\\ &=-\frac{d \cot (a+b x)}{2 b^2}-\frac{(c+d x) \csc ^2(a+b x)}{2 b}\\ \end{align*}

Mathematica [A]  time = 0.0738112, size = 48, normalized size = 1.37 \[ -\frac{d \cot (a+b x)}{2 b^2}-\frac{c \csc ^2(a+b x)}{2 b}-\frac{d x \csc ^2(a+b x)}{2 b} \]

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x)*Cot[a + b*x]*Csc[a + b*x]^2,x]

[Out]

-(d*Cot[a + b*x])/(2*b^2) - (c*Csc[a + b*x]^2)/(2*b) - (d*x*Csc[a + b*x]^2)/(2*b)

________________________________________________________________________________________

Maple [A]  time = 0.029, size = 61, normalized size = 1.7 \begin{align*}{\frac{1}{b} \left ({\frac{d}{b} \left ( -{\frac{bx+a}{2\, \left ( \sin \left ( bx+a \right ) \right ) ^{2}}}-{\frac{\cot \left ( bx+a \right ) }{2}} \right ) }+{\frac{ad}{2\,b \left ( \sin \left ( bx+a \right ) \right ) ^{2}}}-{\frac{c}{2\, \left ( \sin \left ( bx+a \right ) \right ) ^{2}}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*x+c)*cos(b*x+a)*csc(b*x+a)^3,x)

[Out]

1/b*(d/b*(-1/2*(b*x+a)/sin(b*x+a)^2-1/2*cot(b*x+a))+1/2/b*d*a/sin(b*x+a)^2-1/2*c/sin(b*x+a)^2)

________________________________________________________________________________________

Maxima [B]  time = 1.16603, size = 387, normalized size = 11.06 \begin{align*} \frac{\frac{2 \,{\left (4 \,{\left (b x + a\right )} \cos \left (2 \, b x + 2 \, a\right )^{2} + 4 \,{\left (b x + a\right )} \sin \left (2 \, b x + 2 \, a\right )^{2} -{\left (2 \,{\left (b x + a\right )} \cos \left (2 \, b x + 2 \, a\right ) + \sin \left (2 \, b x + 2 \, a\right )\right )} \cos \left (4 \, b x + 4 \, a\right ) - 2 \,{\left (b x + a\right )} \cos \left (2 \, b x + 2 \, a\right ) -{\left (2 \,{\left (b x + a\right )} \sin \left (2 \, b x + 2 \, a\right ) - \cos \left (2 \, b x + 2 \, a\right ) + 1\right )} \sin \left (4 \, b x + 4 \, a\right ) + \sin \left (2 \, b x + 2 \, a\right )\right )} d}{{\left (2 \,{\left (2 \, \cos \left (2 \, b x + 2 \, a\right ) - 1\right )} \cos \left (4 \, b x + 4 \, a\right ) - \cos \left (4 \, b x + 4 \, a\right )^{2} - 4 \, \cos \left (2 \, b x + 2 \, a\right )^{2} - \sin \left (4 \, b x + 4 \, a\right )^{2} + 4 \, \sin \left (4 \, b x + 4 \, a\right ) \sin \left (2 \, b x + 2 \, a\right ) - 4 \, \sin \left (2 \, b x + 2 \, a\right )^{2} + 4 \, \cos \left (2 \, b x + 2 \, a\right ) - 1\right )} b} - \frac{c}{\sin \left (b x + a\right )^{2}} + \frac{a d}{b \sin \left (b x + a\right )^{2}}}{2 \, b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*cos(b*x+a)*csc(b*x+a)^3,x, algorithm="maxima")

[Out]

1/2*(2*(4*(b*x + a)*cos(2*b*x + 2*a)^2 + 4*(b*x + a)*sin(2*b*x + 2*a)^2 - (2*(b*x + a)*cos(2*b*x + 2*a) + sin(
2*b*x + 2*a))*cos(4*b*x + 4*a) - 2*(b*x + a)*cos(2*b*x + 2*a) - (2*(b*x + a)*sin(2*b*x + 2*a) - cos(2*b*x + 2*
a) + 1)*sin(4*b*x + 4*a) + sin(2*b*x + 2*a))*d/((2*(2*cos(2*b*x + 2*a) - 1)*cos(4*b*x + 4*a) - cos(4*b*x + 4*a
)^2 - 4*cos(2*b*x + 2*a)^2 - sin(4*b*x + 4*a)^2 + 4*sin(4*b*x + 4*a)*sin(2*b*x + 2*a) - 4*sin(2*b*x + 2*a)^2 +
 4*cos(2*b*x + 2*a) - 1)*b) - c/sin(b*x + a)^2 + a*d/(b*sin(b*x + a)^2))/b

________________________________________________________________________________________

Fricas [A]  time = 0.456576, size = 103, normalized size = 2.94 \begin{align*} \frac{b d x + d \cos \left (b x + a\right ) \sin \left (b x + a\right ) + b c}{2 \,{\left (b^{2} \cos \left (b x + a\right )^{2} - b^{2}\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*cos(b*x+a)*csc(b*x+a)^3,x, algorithm="fricas")

[Out]

1/2*(b*d*x + d*cos(b*x + a)*sin(b*x + a) + b*c)/(b^2*cos(b*x + a)^2 - b^2)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*cos(b*x+a)*csc(b*x+a)**3,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 1.20892, size = 710, normalized size = 20.29 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*cos(b*x+a)*csc(b*x+a)^3,x, algorithm="giac")

[Out]

-1/8*(b*d*x*tan(1/2*b*x)^4*tan(1/2*a)^4 + b*c*tan(1/2*b*x)^4*tan(1/2*a)^4 + 2*b*d*x*tan(1/2*b*x)^4*tan(1/2*a)^
2 + 2*b*d*x*tan(1/2*b*x)^2*tan(1/2*a)^4 + 2*b*c*tan(1/2*b*x)^4*tan(1/2*a)^2 - 2*d*tan(1/2*b*x)^4*tan(1/2*a)^3
+ 2*b*c*tan(1/2*b*x)^2*tan(1/2*a)^4 - 2*d*tan(1/2*b*x)^3*tan(1/2*a)^4 + b*d*x*tan(1/2*b*x)^4 + 4*b*d*x*tan(1/2
*b*x)^2*tan(1/2*a)^2 + b*d*x*tan(1/2*a)^4 + b*c*tan(1/2*b*x)^4 + 2*d*tan(1/2*b*x)^4*tan(1/2*a) + 4*b*c*tan(1/2
*b*x)^2*tan(1/2*a)^2 + 12*d*tan(1/2*b*x)^3*tan(1/2*a)^2 +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